#ifndef BLACKHOLE_ACTIVITY_RULE_H
#define BLACKHOLE_ACTIVITY_RULE_H

#include "ivalidatorrule.h"

#include <QtCore/QObject>

namespace core
{
class IGraphicEditorItem;
}

namespace swp
{
class GraphicData;

class BlackholeActivityRule : public QObject, public IValidatorRule
{
    Q_OBJECT

public:
    BlackholeActivityRule();
    ~BlackholeActivityRule();

    // IValidatorRule
    bool isProjectWide() const;
    bool validate(
        const QSharedPointer<core::IContainerDocument>& document,
        QAction*& reportClickAction, QString& reportText) const;
    bool validate(const QSharedPointer<core::IDocument>& document,
        QAction*& reportClickAction, QString& reportText) const;

private slots:
    void selectNotPassedItems();

private:
    QAction* m_action;
    mutable GraphicData* m_lastData;
    mutable QList<core::IGraphicEditorItem* > m_notPassed;
};

} // namespace swp

#endif
